package com.ysm.freestyle.base

import android.util.Log
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner

class ActivityLifecycleObserver : DefaultLifecycleObserver{
    private val TAG = "ActivityLifecycleObserver"


    override fun onCreate(owner: LifecycleOwner) {
        super.onCreate(owner)
        Log.i(TAG,"Lifecycle onCreate...")
    }

    override fun onStart(owner: LifecycleOwner) {
        super.onStart(owner)
        Log.i(TAG,"Lifecycle onStart...")
    }

    override fun onResume(owner: LifecycleOwner) {
        super.onResume(owner)
        Log.i(TAG,"Lifecycle onResume...")
    }

    override fun onPause(owner: LifecycleOwner) {
        super.onPause(owner)
        Log.i(TAG,"Lifecycle onPause...")
    }

    override fun onStop(owner: LifecycleOwner) {
        super.onStop(owner)
        Log.i(TAG,"Lifecycle onStop...")
    }

    override fun onDestroy(owner: LifecycleOwner) {
        super.onDestroy(owner)
        Log.i(TAG,"Lifecycle onDestroy...")
    }

}